<ui:composition template="user_page_template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<ui:define name="content">
		<h4>New daily plan</h4>
		<h:form id="DailyPlanForm">
			<h:panelGrid columns="1">
				<!-- 				
					<h:outputLabel value="Date" for="date" />
					<h:inputText id="date" label="date" value="#{dailyPlanBean.date}"
						required="true" requiredMessage="required" />
-->

				<h:outputLabel value="Activity" for="activity" />
				<h:selectOneMenu id="activity" label="activity"
					value="#{dailyPlanBean.activity}" required="true"
					requiredMessage="required" styleClass="combobox">
					<f:selectItems value="#{dailyPlanBean.activities}" var="activity"
						itemLabel="#{activity.label}" />
				</h:selectOneMenu>

				<h:outputLabel value="Estimate duration" for="estimateDuration" />
				<h:inputText id="estimateDuration" label="estimateDuration"
					value="#{dailyPlanBean.estimateDuration}" required="true"
					requiredMessage="required" />

				<h:outputLabel value="Actual Duration" for="actualDuration" />
				<h:inputText id="actualDuration"
					value="#{dailyPlanBean.actualDuration}" required="false" />

				<h:outputLabel value="Comments" for="comments" />
				<h:inputTextarea id="comments" value="#{dailyPlanBean.comments}"
					required="false" />

				<h:panelGrid columns="2">
					<h:commandButton id="Ok" action="#{dailyPlanBean.saveChanges}"
						value="Ok" styleClass="btn btn-primary" />

					<h:commandButton id="Cancel" action="#{dailyPlanBean.cancel}"
						value="Cancel" styleClass="btn" />

				</h:panelGrid>

			</h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>